Check for existence of buffer in which-key--popup-showing-p
authorJustin Burkett <justin@burkett.cc>
Thu, 8 Nov 2018 15:21:07 +0000 (10:21 -0500)
committerJustin Burkett <justin@burkett.cc>
Thu, 8 Nov 2018 15:21:07 +0000 (10:21 -0500)
Fixes #197

which-key.el

index 09effbc7aa1ac6277ca6ea43e3940cdbe7f19132..c62924da823ddf597b7671af22b4e63d1789b32a 100644 (file)
@@ -1111,7 +1111,8 @@ popup)."
     (delete-frame which-key--frame)))
 
 (defun which-key--popup-showing-p ()
-  (window-live-p (get-buffer-window which-key--buffer)))
+  (and (bufferp which-key--buffer)
+       (window-live-p (get-buffer-window which-key--buffer))))
 
 (defun which-key--show-popup (act-popup-dim)
   "Show the which-key buffer.